Add (LAT|LON)_DDMMDIR to write site. Tweak doc. Let cup use this.
authorrobertl <robertl>
Fri, 20 Jun 2008 14:41:14 +0000 (14:41 +0000)
committerrobertl <robertl>
Fri, 20 Jun 2008 14:41:14 +0000 (14:41 +0000)
csv_util.c
internal_styles.c

index 680946b3b9a8359f1eda347e67758d88e60e243a..1ea09aba6927c051c0bba6938856c0b1656845c7 100644 (file)
@@ -1548,6 +1548,10 @@ xcsv_waypt_pr(const waypoint *wpt)
             writebuff(buff, fmp->printfc,
               dec_to_intdeg(lat));
             break;
+        case XT_LAT_DDMMDIR:
+            /*latitude as (degrees * 100) + decimal minutes, with N/S after it */
+            dec_to_human( buff, fmp->printfc, "SN", degrees2ddmm(lat) );
+            break;
        case XT_LAT_HUMAN_READABLE:
            dec_to_human( buff, fmp->printfc, "SN", lat );
            break;
@@ -1577,6 +1581,10 @@ xcsv_waypt_pr(const waypoint *wpt)
             writebuff(buff, fmp->printfc,
               dec_to_intdeg(lon));
             break;
+        case XT_LON_DDMMDIR:
+            /* longidute as (degrees * 100) + decimal minutes, with W/E after it*/
+            dec_to_human( buff, fmp->printfc, "WE", degrees2ddmm(lon) );
+            break;
        case XT_LON_HUMAN_READABLE:
            dec_to_human( buff, fmp->printfc, "WE", lon );
            break;
index c48607a33619e8bd1d46970d00048e3eee529804..b21cab1420c5a0dfe45aeb9f710665fdfbf6dd0b 100644 (file)
@@ -113,10 +113,8 @@ static char cup[] =
 "OFIELD SHORTNAME,\"\", \"\"%s\"\"\n"
 "OFIELD SHORTNAME,\"\", \"%s\"\n"
 "OFIELD CONSTANT,\"\", \"\"\n"
-"OFIELD LAT_NMEA, \"%f\", \"%08.3f\", \"absolute\"\n"
-"OFIELD LAT_DIR, \"\", \"%c\", \"no_delim_before\"\n"
-"OFIELD LON_NMEA, \"%f\", \"%09.3f\", \"absolute\"\n"
-"OFIELD LON_DIR, \"\", \"%c\", \"no_delim_before\"\n"
+"OFIELD LAT_DDMMDIR, \"\", \"%08.3f%c\"\n"
+"OFIELD LON_DDMMDIR, \"\", \"%09.3f%c\"\n"
 "OFIELD ALT_METERS,\"\", \"%3.1fm\"\n"
 "OFIELD CONSTANT,\"\", \"1\"\n"
 "OFIELD CONSTANT,\"\", \"\"\n"